/**
 * 请求类型
 */
export enum RequestMethod {
  OPTIONS = "OPTIONS",
  GET = "GET",
  HEAD = "HEAD",
  POST = "POST",
  PUT = "PUT",
  DELETE = "DELETE",
  TRACE = "TRACE",
  CONNECT = "CONNECT"
}

export enum ContentType {
  HTTP = 'application/x-www-form-urlencoded',
  JSON = 'application/json'
}

/**
 * 网络请求配置
 */
export interface RequestOptions {

  /**
   * Request url.
   */
  url?: string;

  /**
   * Request method.
   */
  method?: RequestMethod;

  /**
   * Additional data of the request.
   */
  extraData?: string | Object | ArrayBuffer;

  /**
   * Request url queryParams  .
   */
  queryParams ?: string | Object;

  /**
   * HTTP request header.
   */
  header?: any;

}